<?php use_helper('I18N') ?>

<form id="register_form" action="<?php echo url_for('@sf_guard_register') ?>" method="post" class='frm_register'>
  <table class='responsive table table-option'>
  	<thead>
    	<tr>
        	<th colspan="2" align="center"><?php echo __('Register', null, 'sf_guard') ?></th>
        </tr>
    </thead>
    <?php echo $form ?>
    <tfoot>
      <tr>
        <td>
          
        </td>
        <td>
        	<button class="btn btn-success" name="register"><?php echo __('Register', null, 'sf_guard') ?></button>
        </td>
      </tr>
    </tfoot>
  </table>
</form>

<script>
	$(document).ready(function()
	{
		$("#register_form").validate({
			rules: {
				"sf_guard_user[first_name]": "required",
				"sf_guard_user[last_name]": "required",
				"sf_guard_user[address]": "required",
				"sf_guard_user[tel]": "required",
				"sf_guard_user[username]": "required",
				"sf_guard_user[email_address]": {
					required: true,
					email: true
				},
				"sf_guard_user[password]": {
					required: true
				},
				"sf_guard_user[password_again]": {
					required: true,
					equalTo: "#sf_guard_user_password"
				}
			}
		});
	});
</script>